
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
 */
package com.vendas.sistema.util;

//~--- non-JDK imports --------------------------------------------------------

import com.vendas.sistema.util.HibernateUtil;

import org.hibernate.Session;

//~--- JDK imports ------------------------------------------------------------

import java.sql.Connection;

/**
 *
 * @author leandro
 */
public class Conecta {
    public static void main(String[] args) {
        Session sessao = null;

        try {
            sessao = HibernateUtil.getSessionFactory().openSession();
            System.out.println("Conectou!");
        } finally {
            sessao.getSessionFactory().close();
            System.out.println("Conexão encerrada");
        }
    }
}


//~ Formatted by Jindent --- http://www.jindent.com
